home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1997 February / macformat-047.iso / Demos / Days of Rage Demo / DORDEM.Dxr / 00270.ls < prev    next >
Encoding:
Text File  |  1996-11-15  |  1.9 KB  |  83 lines

  1. on textMouse
  2.   global gMidEssayStage, gCurrTextpic, gAcceptTextClix, gReadCheck
  3.   if gAcceptTextClix = 1 then
  4.     if the mouseH > gMidEssayStage then
  5.       textNext()
  6.     else
  7.       if the frameLabel contains "Text" then
  8.         if gReadCheck = 0 then
  9.           textNext()
  10.         else
  11.           textPrev()
  12.         end if
  13.       else
  14.         textPrev()
  15.       end if
  16.     end if
  17.     if the puppet of sprite 7 = 1 then
  18.       set the locV of sprite 7 to -1000
  19.       updateStage()
  20.       puppetSprite(7, 0)
  21.     end if
  22.   end if
  23. end
  24.  
  25. on textNext
  26.   global gCurrTextpic, gEssayPages, gEssayFirstLast
  27.   if (gCurrTextpic + 1) <= gEssayPages then
  28.     tacticalOff()
  29.     set gCurrTextpic to gCurrTextpic + 1
  30.     go(the frame + 1)
  31.   else
  32.     tacticalOff()
  33.     set gCurrTextpic to 1
  34.     if gEssayPages = 2 then
  35.       go("TextJP")
  36.     else
  37.       go("TextJF")
  38.     end if
  39.   end if
  40. end
  41.  
  42. on textPrev
  43.   global gCurrTextpic, gEssayPages, gEssayFirstLast
  44.   if (gCurrTextpic - 1) > 0 then
  45.     tacticalOff()
  46.     set gCurrTextpic to gCurrTextpic - 1
  47.     go(the frame - 1)
  48.   else
  49.     set gCurrTextpic to gEssayPages
  50.     if gEssayPages = 2 then
  51.       go("LastJP")
  52.     else
  53.       go("LastJF")
  54.     end if
  55.   end if
  56. end
  57.  
  58. on getEssayHyperText whichFile
  59.   global gDirSep, gFileIOObj, gCDName
  60.   tacticalOff()
  61.   set p to gCDName & "TEXT" & gDirSep & whichFile
  62.   if objectp(gFileIOObj) then
  63.     gFileIOObj(mdispose)
  64.   end if
  65.   if the machineType = 256 then
  66.     openXLib(the pathName & "xtras" & "\" & "Fileio.dll")
  67.   else
  68.   end if
  69.   set gFileIOObj to FileIO(mnew, "read", p)
  70.   set ret to gFileIOObj(mReadFile)
  71.   gFileIOObj(mdispose)
  72.   puppetSprite(7, 1)
  73.   set the text of cast "EssayHyperField" to ret
  74.   set the textFont of member "EssayHyperField" to "Geneva"
  75.   set the textSize of member "EssayHyperField" to 12
  76.   set the locV of sprite 7 to the top of sprite 16
  77.   updateStage()
  78.   if the machineType = 256 then
  79.     closeXLib(the pathName & "xtras" & "\" & "Fileio.dll")
  80.   else
  81.   end if
  82. end
  83.